﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using JamesZhao.Engine.GameObjects;
using SlimDX.DirectInput;

namespace JamesZhao.Engine.GameComponents
{
    class ConstantMovement : GameComponent
    {
        public float Speed { get; set; }
        public ConstantMovement(GameObject owner) : base(owner)
        {
            Speed = 0.000001f;
        }
        public override void Update()
        {
            base.Update();
            //Transform.LocalPosition += Transform.Forward;
            if (Input.GetKey(Key.W))
            {
                Transform.LocalPosition += Transform.Forward * 0.1f;
            }
            else if (Input.GetKey(Key.S))
            {
                Transform.LocalPosition -= Transform.Forward * 0.1f;
            }
            //Console.WriteLine("local pos = " + Transform.LocalPosition);
        }
    }
}
